<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<body>
<div id="app">
    <ul>
        <li>姓名：{{user.username}}</li>

    </ul>
</div>

<!--引入Vue-->
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<!--引入axios-->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script type="text/javascript">
    var vm = new Vue({
        el:"#app",
        data() {
            return {
                user:{
                    username:""
                }
            }
        },
        mounted() {
            /*get请求*/
            axios.get("http://localhost:8080/user").then(response => this.user = response.data)
            
        }


    });
</script>


</body>
</html>